var Agent = require('../requireServers/agentservice.js');
var post_data = {
    nper: 6,
    eachMoney: 1333.33,
    totalamount: 8000.00,
    orderIddes: "A/xWB1vvNjFqudi8fwWIkScRqHyp5DAl",
    sign :"ZDFjOTE5OTkyMzczYzIyMjdiMDQwYzdjNzk4Y2U3MTQ="
};

var options = {
    hostname: '10.2.235.45',
    port: 8080,
    path: '/assetbm/payinstallment/OrderInstallPay/pcinstallorder.do',
    method: 'POST',
    headers: {
        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
    }
};

function getAgent(theoptions, postData) {
    if (postData) {
        post_data = postData;
    }

    var theAgent = new Agent(options, post_data);

    return theAgent;
}

module.exports = {
    getAgent: getAgent
};